from ocr_service import OCRService

ocr_service = OCRService()
ocr_service.load_model_config("ocr_rec_model")
ocr_service.set_gpus("0")
ocr_service.prepare_server(
    workdir="workdir", port=9292, device="gpu", gpuid=0)
ocr_service.init_det_client(
    det_port=9293,
    det_client_config="ocr_det_client/serving_client_conf.prototxt")
ocr_service.run_rpc_service()
ocr_service.run_web_service()
